翻訳と辞書
Words near each other
・ Recurring Saturday Night Live characters and sketches introduced 2003–2004
・ Recurring Saturday Night Live characters and sketches introduced 2004–2005
・ Recurring Saturday Night Live characters and sketches introduced 2005–2006
・ Recurring Saturday Night Live characters and sketches introduced 2006–2007
・ Recurring Saturday Night Live characters and sketches introduced 2007–2008
・ Recurring Saturday Night Live characters and sketches introduced 2008–2009
・ Recurring Saturday Night Live characters and sketches introduced 2009–2010
・ Recurring Saturday Night Live characters and sketches introduced 2010–2011
・ Recurring Saturday Night Live characters and sketches introduced 2011–2012
・ Recurring Saturday Night Live characters and sketches introduced 2012–2013
・ Recurring Saturday Night Live characters and sketches introduced 2013–2014
・ Recurring segments on The Colbert Report
・ Recurring status
・ Recurse
・ Recursion
Recursion (computer science)
・ Recursion (disambiguation)
・ Recursion (novel)
・ Recursion termination
・ Recursion theorem
・ Recursive acronym
・ Recursive ascent parser
・ Recursive Bayesian estimation
・ Recursive categorical syntax
・ Recursive competitive equilibrium
・ Recursive data type
・ Recursive definition
・ Recursive descent parser
・ Recursive economics
・ Recursive filter


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Recursion (computer science) : ウィキペディア英語版
Recursion (computer science)

Recursion in computer science is a method where the solution to a problem depends on solutions to smaller instances of the same problem (as opposed to iteration). The approach can be applied to many types of problems, and recursion is one of the central ideas of computer science.
"The power of recursion evidently lies in the possibility of defining an infinite set of objects by a finite statement. In the same manner, an infinite number of computations can be described by a finite recursive program, even if this program contains no explicit repetitions."

Most computer programming languages support recursion by allowing a function to call itself within the program text. Some functional programming languages do not define any looping constructs but rely solely on recursion to repeatedly call code. Computability theory proves that these recursive-only languages are Turing complete; they are as computationally powerful as Turing complete imperative languages, meaning they can solve the same kinds of problems as imperative languages even without iterative control structures such as “while” and “for”.

==Recursive functions and algorithms==
A common computer programming tactic is to divide a problem into sub-problems of the same type as the original, solve those sub-problems, and combine the results. This is often referred to as the divide-and-conquer method; when combined with a lookup table that stores the results of solving sub-problems (to avoid solving them repeatedly and incurring extra computation time), it can be referred to as dynamic programming or memoization.
A recursive function definition has one or more ''base cases'', meaning input(s) for which the function produces a result trivially (without recurring), and one or more ''recursive cases'', meaning input(s) for which the program recurs (calls itself). For example, the factorial function can be defined recursively by the equations and, for all , . Neither equation by itself constitutes a complete definition; the first is the base case, and the second is the recursive case. Because the base case breaks the chain of recursion, it is sometimes also called the "terminating case".
The job of the recursive cases can be seen as breaking down complex inputs into simpler ones. In a properly designed recursive function, with each recursive call, the input problem must be simplified in such a way that eventually the base case must be reached. (Functions that are not intended to terminate under normal circumstances—for example, some system and server processes—are an exception to this.) Neglecting to write a base case, or testing for it incorrectly, can cause an infinite loop.
For some functions (such as one that computes the series for ) there is not an obvious base case implied by the input data; for these one may add a parameter (such as the number of terms to be added, in our series example) to provide a 'stopping criterion' that establishes the base case. Such an example is more naturally treated by co-recursion, where successive terms in the output are the partial sums; this can be converted to a recursion by using the indexing parameter to say "compute the ''n''th term (''n''th partial sum)".

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Recursion (computer science)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.